#include <stdio.h>
#include <string.h>
#include "cmd_handle.h"
#define SZ_CMD 64
int main(int argc, char const *argv[])
{
    /* code */
    char command[SZ_CMD] = {0};

    for (;;) {
        printf("TinyShelll > ");

        // 从键盘中获取数据
        fgets(command, SZ_CMD, stdin); // 需要去掉\n
        command[strlen(command) - 1] = '\0';

        //如果是退出标识
        if (strncmp(command, "quit", 4) == 0) {
            printf("Bye!\n");
            break;
        }
        // 调用 cmd_handle 函数执行命令
        cmd_handle(command);
    }
    return 0;
}
